//
//  CPYSingerCollectionViewCell.m
//  TTMusic
//
//  Created by chenpengyu on 16/4/3.
//  Copyright © 2016年 cpy. All rights reserved.
//

#import "CPYSingerCollectionViewCell.h"

@implementation CPYSingerCollectionViewCell
- (instancetype)initWithFrame:(CGRect)frame {
    self = [super initWithFrame:frame];
    if (self) {
        self.typeImageView = [[UIImageView alloc] initWithFrame:CGRectMake(10, 10, self.contentView.bounds.size.width - 20, self.contentView.bounds.size.height - 50)];
        self.typeLabel = [[TTMusicBaseLabel alloc] initWithFrame:CGRectMake(10, _typeImageView.frame.origin.y + _typeImageView.bounds.size.height + 5, _typeImageView.bounds.size.width, 30)];
        _typeLabel.textAlignment = NSTextAlignmentCenter;
        [self.contentView addSubview:_typeImageView];
        [self.contentView addSubview:_typeLabel];
    }
    return self;
}
- (void)setSingerModel:(TTMusicSingerModel *)singerModel {
    _singerModel = singerModel;
    _typeLabel.text = singerModel.title;
    [_typeImageView sd_setImageWithURL:[NSURL URLWithString:singerModel.pic_url]];
}
/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/

@end
